<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        .box{
            /*
              vw表示在移动端的视口占比(100vw 表示占视口(viewport width) 为100%)
            */
            width: 100vw;
            height: 100px;
            background-color: blueviolet;
        }
    </style>
</head>
<body>
 <div class="box"></div> 
</body>
</html>